Optimal. Leaf size=194 \[ \frac {4 a^2 (6 A+7 B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}-\frac {4 a^2 (3 A+4 B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {4 a^2 (6 A+7 B) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2 (9 A+7 B) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^2 (3 A+4 B) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 A \sin (c+d x) \left (a^2 \cos (c+d x)+a^2\right )}{7 d \cos ^{\frac {7}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 194, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {2975, 2968, 3021, 2748, 2636, 2641, 2639} \[ \frac {4 a^2 (6 A+7 B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}-\frac {4 a^2 (3 A+4 B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {4 a^2 (6 A+7 B) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {2 a^2 (9 A+7 B) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^2 (3 A+4 B) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 A \sin (c+d x) \left (a^2 \cos (c+d x)+a^2\right )}{7 d \cos ^{\frac {7}{2}}(c+d x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2636
Rule 2639
Rule 2641
Rule 2748
Rule 2968
Rule 2975
Rule 3021
Rubi steps
\begin {align*} \int \frac {(a+a \cos (c+d x))^2 (A+B \cos (c+d x))}{\cos ^{\frac {9}{2}}(c+d x)} \, dx &=\frac {2 A \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2}{7} \int \frac {(a+a \cos (c+d x)) \left (\frac {1}{2} a (9 A+7 B)+\frac {1}{2} a (3 A+7 B) \cos (c+d x)\right )}{\cos ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 A \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {2}{7} \int \frac {\frac {1}{2} a^2 (9 A+7 B)+\left (\frac {1}{2} a^2 (3 A+7 B)+\frac {1}{2} a^2 (9 A+7 B)\right ) \cos (c+d x)+\frac {1}{2} a^2 (3 A+7 B) \cos ^2(c+d x)}{\cos ^{\frac {7}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 (9 A+7 B) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 A \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {4}{35} \int \frac {\frac {5}{2} a^2 (6 A+7 B)+\frac {7}{2} a^2 (3 A+4 B) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 (9 A+7 B) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {2 A \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}+\frac {1}{5} \left (2 a^2 (3 A+4 B)\right ) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx+\frac {1}{7} \left (2 a^2 (6 A+7 B)\right ) \int \frac {1}{\cos ^{\frac {5}{2}}(c+d x)} \, dx\\ &=\frac {2 a^2 (9 A+7 B) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^2 (6 A+7 B) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 (3 A+4 B) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 A \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}-\frac {1}{5} \left (2 a^2 (3 A+4 B)\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{21} \left (2 a^2 (6 A+7 B)\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx\\ &=-\frac {4 a^2 (3 A+4 B) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {4 a^2 (6 A+7 B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{21 d}+\frac {2 a^2 (9 A+7 B) \sin (c+d x)}{35 d \cos ^{\frac {5}{2}}(c+d x)}+\frac {4 a^2 (6 A+7 B) \sin (c+d x)}{21 d \cos ^{\frac {3}{2}}(c+d x)}+\frac {4 a^2 (3 A+4 B) \sin (c+d x)}{5 d \sqrt {\cos (c+d x)}}+\frac {2 A \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d \cos ^{\frac {7}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 6.63, size = 925, normalized size = 4.77 \[ \sqrt {\cos (c+d x)} (\cos (c+d x) a+a)^2 \left (\frac {A \sec (c) \sin (d x) \sec ^4(c+d x)}{14 d}+\frac {\sec (c) (5 A \sin (c)+14 A \sin (d x)+7 B \sin (d x)) \sec ^3(c+d x)}{70 d}+\frac {\sec (c) (42 A \sin (c)+21 B \sin (c)+60 A \sin (d x)+70 B \sin (d x)) \sec ^2(c+d x)}{210 d}+\frac {\sec (c) (30 A \sin (c)+35 B \sin (c)+63 A \sin (d x)+84 B \sin (d x)) \sec (c+d x)}{105 d}+\frac {(3 A+4 B) \csc (c) \sec (c)}{5 d}\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right )+\frac {3 A (\cos (c+d x) a+a)^2 \csc (c) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2\left (d x+\tan ^{-1}(\tan (c))\right )\right ) \sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt {1-\cos \left (d x+\tan ^{-1}(\tan (c))\right )} \sqrt {\cos \left (d x+\tan ^{-1}(\tan (c))\right )+1} \sqrt {\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt {\tan ^2(c)+1}} \sqrt {\tan ^2(c)+1}}-\frac {\frac {2 \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt {\tan ^2(c)+1} \cos ^2(c)}{\cos ^2(c)+\sin ^2(c)}+\frac {\sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt {\tan ^2(c)+1}}}{\sqrt {\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt {\tan ^2(c)+1}}}\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{10 d}+\frac {2 B (\cos (c+d x) a+a)^2 \csc (c) \left (\frac {\, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2\left (d x+\tan ^{-1}(\tan (c))\right )\right ) \sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt {1-\cos \left (d x+\tan ^{-1}(\tan (c))\right )} \sqrt {\cos \left (d x+\tan ^{-1}(\tan (c))\right )+1} \sqrt {\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt {\tan ^2(c)+1}} \sqrt {\tan ^2(c)+1}}-\frac {\frac {2 \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt {\tan ^2(c)+1} \cos ^2(c)}{\cos ^2(c)+\sin ^2(c)}+\frac {\sin \left (d x+\tan ^{-1}(\tan (c))\right ) \tan (c)}{\sqrt {\tan ^2(c)+1}}}{\sqrt {\cos (c) \cos \left (d x+\tan ^{-1}(\tan (c))\right ) \sqrt {\tan ^2(c)+1}}}\right ) \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{5 d}-\frac {2 A (\cos (c+d x) a+a)^2 \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right ) \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \sqrt {1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {-\sqrt {\cot ^2(c)+1} \sin (c) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{7 d \sqrt {\cot ^2(c)+1}}-\frac {B (\cos (c+d x) a+a)^2 \csc (c) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2\left (d x-\tan ^{-1}(\cot (c))\right )\right ) \sec \left (d x-\tan ^{-1}(\cot (c))\right ) \sqrt {1-\sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {-\sqrt {\cot ^2(c)+1} \sin (c) \sin \left (d x-\tan ^{-1}(\cot (c))\right )} \sqrt {\sin \left (d x-\tan ^{-1}(\cot (c))\right )+1} \sec ^4\left (\frac {c}{2}+\frac {d x}{2}\right )}{3 d \sqrt {\cot ^2(c)+1}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.88, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {B a^{2} \cos \left (d x + c\right )^{3} + {\left (A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} + {\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right ) + A a^{2}}{\cos \left (d x + c\right )^{\frac {9}{2}}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} {\left (a \cos \left (d x + c\right ) + a\right )}^{2}}{\cos \left (d x + c\right )^{\frac {9}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 4.04, size = 851, normalized size = 4.39 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} {\left (a \cos \left (d x + c\right ) + a\right )}^{2}}{\cos \left (d x + c\right )^{\frac {9}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.30, size = 235, normalized size = 1.21 \[ \frac {30\,A\,a^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {7}{4},\frac {1}{2};\ -\frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )+84\,A\,a^2\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+70\,A\,a^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{105\,d\,{\cos \left (c+d\,x\right )}^{7/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}}+\frac {6\,B\,a^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {5}{4},\frac {1}{2};\ -\frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+20\,B\,a^2\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{4},\frac {1}{2};\ \frac {1}{4};\ {\cos \left (c+d\,x\right )}^2\right )+30\,B\,a^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{4},\frac {1}{2};\ \frac {3}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{15\,d\,{\cos \left (c+d\,x\right )}^{5/2}\,\sqrt {1-{\cos \left (c+d\,x\right )}^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________